import Vue from 'vue';
import Vuex from 'vuex';

// 1.安装插件
Vue.use(Vuex);

import modulesA from './modules/modulesA'
import getters from './getter'
import mutations from './mutations'
import actions from './action'


// 2.创建对象
const store = new Vuex.Store({
      state: {
        count: 1000,
        person: [{
          name: 'zhangsan',
          age: 23
        }, {
          name: 'lisi',
          age: 24
        }, {
          name: 'wangwu',
          age: 15
        }]
  },
  getters,
  mutations,
    actions,
      modules: {
        a: modulesA,
      }
})
    
export default store;

